<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: TrafficLight
  
    &mdash; Documentation by YARD 0.7.5
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '';
  if (relpath != '') relpath += '/';
</script>

  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (T)</a> &raquo; 
    
    
    <span class="title">TrafficLight</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a id="class_list_link" href="#">Class List</a>
  
    <a id="method_list_link" href="#">Method List</a>
  
    <a id="file_list_link" href="#">File List</a>
  
</div>
      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: TrafficLight
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">TrafficLight</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">traffic_light.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>State Machines</h2>

This class contains 1 state machine(s).


  <h3>state</h3>
  <p></p>
  
  
  <img alt="State machine diagram for state" src="TrafficLight_state.png" />
  





  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#state-instance_method" title="#state (instance method)">- (Object) <strong>state</strong> </a>
    

    
  </span>
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the current attribute value for the machine.
</p>
</div></span>
  
</li>

    
  </ul>




  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#human_state_event_name-class_method" title="human_state_event_name (class method)">+ (String) <strong>human_state_event_name</strong>(event) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the humanized name for the given event.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#human_state_name-class_method" title="human_state_name (class method)">+ (String) <strong>human_state_name</strong>(state) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the humanized name for the given state.
</p>
</div></span>
  
</li>

      
    </ul>
  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#can_cycle%3F-instance_method" title="#can_cycle? (instance method)">- (Boolean) <strong>can_cycle?</strong>(requirements = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Checks whether :cycle can be fired.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#caution%3F-instance_method" title="#caution? (instance method)">- (Boolean) <strong>caution?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Checks whether :caution is the current state.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#cycle-instance_method" title="#cycle (instance method)">- (Boolean) <strong>cycle</strong>(*args) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Fires the :cycle event.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#cycle%21-instance_method" title="#cycle! (instance method)">- (Boolean) <strong>cycle!</strong>(*args) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Fires the :cycle event, raising an exception if it fails.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#cycle_transition-instance_method" title="#cycle_transition (instance method)">- (StateMachine::Transition) <strong>cycle_transition</strong>(requirements = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the next transition that would be performed if :cycle were to be
fired.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#fire_state_event-instance_method" title="#fire_state_event (instance method)">- (Boolean) <strong>fire_state_event</strong>(event, *args) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Fires an arbitrary state event with the given argument list.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#human_state_name-instance_method" title="#human_state_name (instance method)">- (String) <strong>human_state_name</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the human-readable name of the state for the current value.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#proceed%3F-instance_method" title="#proceed? (instance method)">- (Boolean) <strong>proceed?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Checks whether :proceed is the current state.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#state%3F-instance_method" title="#state? (instance method)">- (Boolean) <strong>state?</strong>(state_name) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Checks the given state name against the current state.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#state_events-instance_method" title="#state_events (instance method)">- (Array&lt;Symbol&gt;) <strong>state_events</strong>(requirements = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the list of events that can be fired on the current state (uses the
<b>unqualified</b> event names).
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#state_name-instance_method" title="#state_name (instance method)">- (Symbol) <strong>state_name</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the internal name of the state for the current value.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#state_paths-instance_method" title="#state_paths (instance method)">- (StateMachine::PathCollection) <strong>state_paths</strong>(requirements = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the list of sequences of transitions that can be run for the current
state.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#state_transitions-instance_method" title="#state_transitions (instance method)">- (Array&lt;StateMachine::Transition&gt;) <strong>state_transitions</strong>(requirements = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Gets the list of transitions that can be made for the current state.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#stop%3F-instance_method" title="#stop? (instance method)">- (Boolean) <strong>stop?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Checks whether :stop is the current state.
</p>
</div></span>
  
</li>

      
    </ul>
  


  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="state=-instance_method"></span>
      <span id="state-instance_method"></span>
      <div class="method_details first">
  <p class="signature first" id="state-instance_method">
  
    - (<tt>Object</tt>) <strong>state</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the current attribute value for the machine
</p>


  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'></span>
      
      
      
        
        <div class='inline'><p>
The attribute value
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="human_state_event_name-class_method">
  
    + (<tt>String</tt>) <strong>human_state_event_name</strong>(event) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the humanized name for the given event.
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>event</span>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The event to look up
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The human event name
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="human_state_name-class_method">
  
    + (<tt>String</tt>) <strong>human_state_name</strong>(state) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the humanized name for the given state.
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>state</span>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The state to look up
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The human state name
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="can_cycle?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>can_cycle?</strong>(requirements = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Checks whether :cycle can be fired.
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>requirements</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>{}</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>
The transition requirements to test against
</p>
</div>
      
    </li>
  
</ul>

  
    
    
    <h3>Options Hash (<tt>requirements</tt>):</h3>
    <ul class="option">
      
        <li>
          <span class="name">:from</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
              &mdash; default:
              <tt>the current state</tt>
            
          </span>
          &mdash; <div class='inline'><p>
One or more initial states
</p>
</div>
        </li>
      
        <li>
          <span class="name">:to</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
One or more target states
</p>
</div>
        </li>
      
        <li>
          <span class="name">:guard</span>
          <span class="type">(<tt>Boolean</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
Whether to guard transitions with conditionals
</p>
</div>
        </li>
      
    </ul>
  

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
<tt>true</tt> if :cycle can be fired, otherwise <tt>false</tt>
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="caution?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>caution?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Checks whether :caution is the current state.
</p>


  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
<tt>true</tt> if this is the current state, otherwise <tt>false</tt>
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="cycle-instance_method">
  
    - (<tt>Boolean</tt>) <strong>cycle</strong>(*args) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Fires the :cycle event.
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>args</span>
      
      
        <span class='type'>(<tt>Array</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
Optional arguments to include in transition callbacks
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
<tt>true</tt> if the transition succeeds, otherwise <tt>false</tt>
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="cycle!-instance_method">
  
    - (<tt>Boolean</tt>) <strong>cycle!</strong>(*args) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Fires the :cycle event, raising an exception if it fails.
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>args</span>
      
      
        <span class='type'>(<tt>Array</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
Optional arguments to include in transition callbacks
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
<tt>true</tt> if the transition succeeds
</p>
</div>
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
      
        <span class='type'>(<tt>StateMachine::InvalidTransition</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
If the transition fails
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="cycle_transition-instance_method">
  
    - (<tt>StateMachine::Transition</tt>) <strong>cycle_transition</strong>(requirements = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the next transition that would be performed if :cycle were to be
fired.
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>requirements</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>{}</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>
The transition requirements to test against
</p>
</div>
      
    </li>
  
</ul>

  
    
    
    <h3>Options Hash (<tt>requirements</tt>):</h3>
    <ul class="option">
      
        <li>
          <span class="name">:from</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
              &mdash; default:
              <tt>the current state</tt>
            
          </span>
          &mdash; <div class='inline'><p>
One or more initial states
</p>
</div>
        </li>
      
        <li>
          <span class="name">:to</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
One or more target states
</p>
</div>
        </li>
      
        <li>
          <span class="name">:guard</span>
          <span class="type">(<tt>Boolean</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
Whether to guard transitions with conditionals
</p>
</div>
        </li>
      
    </ul>
  

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>StateMachine::Transition</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The transition that would be performed or <tt>nil</tt>
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="fire_state_event-instance_method">
  
    - (<tt>Boolean</tt>) <strong>fire_state_event</strong>(event, *args) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Fires an arbitrary state event with the given argument list
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>event</span>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The name of the event to fire
</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>args</span>
      
      
        <span class='type'></span>
      
      
      
        &mdash;
        <div class='inline'><p>
Optional arguments to include in the transition
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
<tt>true</tt> if the event succeeds, otherwise <tt>false</tt>
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="human_state_name-instance_method">
  
    - (<tt>String</tt>) <strong>human_state_name</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the human-readable name of the state for the current value.
</p>


  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The human-readable state name
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="proceed?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>proceed?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Checks whether :proceed is the current state.
</p>


  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
<tt>true</tt> if this is the current state, otherwise <tt>false</tt>
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="state?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>state?</strong>(state_name) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Checks the given state name against the current state.
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>state_name</span>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The name of the state to check
</p>
</div>
      
    </li>
  
</ul>

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
True if they are the same state, otherwise false
</p>
</div>
      
    </li>
  
</ul>
<h3>Raises:</h3>
<ul class="raise">
  
    <li>
      
      
        <span class='type'>(<tt>IndexError</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
If the state name is invalid
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="state_events-instance_method">
  
    - (<tt>Array&lt;Symbol&gt;</tt>) <strong>state_events</strong>(requirements = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the list of events that can be fired on the current state (uses the
<b>unqualified</b> event names)
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>requirements</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>{}</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>
The transition requirements to test against
</p>
</div>
      
    </li>
  
</ul>

  
    
    
    <h3>Options Hash (<tt>requirements</tt>):</h3>
    <ul class="option">
      
        <li>
          <span class="name">:from</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
              &mdash; default:
              <tt>the current state</tt>
            
          </span>
          &mdash; <div class='inline'><p>
One or more initial states
</p>
</div>
        </li>
      
        <li>
          <span class="name">:to</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
One or more target states
</p>
</div>
        </li>
      
        <li>
          <span class="name">:on</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
One or more events that fire the transition
</p>
</div>
        </li>
      
        <li>
          <span class="name">:guard</span>
          <span class="type">(<tt>Boolean</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
Whether to guard transitions with conditionals
</p>
</div>
        </li>
      
    </ul>
  

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array&lt;Symbol&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The list of event names
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="state_name-instance_method">
  
    - (<tt>Symbol</tt>) <strong>state_name</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the internal name of the state for the current value.
</p>


  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Symbol</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The internal name of the state
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="state_paths-instance_method">
  
    - (<tt>StateMachine::PathCollection</tt>) <strong>state_paths</strong>(requirements = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the list of sequences of transitions that can be run for the current
state
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>requirements</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>{}</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>
The transition requirements to test against
</p>
</div>
      
    </li>
  
</ul>

  
    
    
    <h3>Options Hash (<tt>requirements</tt>):</h3>
    <ul class="option">
      
        <li>
          <span class="name">:from</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
              &mdash; default:
              <tt>the current state</tt>
            
          </span>
          &mdash; <div class='inline'><p>
The initial state
</p>
</div>
        </li>
      
        <li>
          <span class="name">:to</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
The target state
</p>
</div>
        </li>
      
        <li>
          <span class="name">:deep</span>
          <span class="type">(<tt>Boolean</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
Whether to enable deep searches for the target state
</p>
</div>
        </li>
      
        <li>
          <span class="name">:guard</span>
          <span class="type">(<tt>Boolean</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
Whether to guard transitions with conditionals
</p>
</div>
        </li>
      
    </ul>
  

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>StateMachine::PathCollection</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The collection of paths
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="state_transitions-instance_method">
  
    - (<tt>Array&lt;StateMachine::Transition&gt;</tt>) <strong>state_transitions</strong>(requirements = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Gets the list of transitions that can be made for the current state
</p>


  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='name'>requirements</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>{}</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>
The transition requirements to test against
</p>
</div>
      
    </li>
  
</ul>

  
    
    
    <h3>Options Hash (<tt>requirements</tt>):</h3>
    <ul class="option">
      
        <li>
          <span class="name">:from</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
              &mdash; default:
              <tt>the current state</tt>
            
          </span>
          &mdash; <div class='inline'><p>
One or more initial states
</p>
</div>
        </li>
      
        <li>
          <span class="name">:to</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
One or more target states
</p>
</div>
        </li>
      
        <li>
          <span class="name">:on</span>
          <span class="type">(<tt>Symbol</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
One or more events that fire the transition
</p>
</div>
        </li>
      
        <li>
          <span class="name">:guard</span>
          <span class="type">(<tt>Boolean</tt>)</span>
          <span class="default">
            
          </span>
          &mdash; <div class='inline'><p>
Whether to guard transitions with conditionals
</p>
</div>
        </li>
      
    </ul>
  

<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array&lt;StateMachine::Transition&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
The available transitions
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="stop?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>stop?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Checks whether :stop is the current state.
</p>


  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>
<tt>true</tt> if this is the current state, otherwise <tt>false</tt>
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'traffic_light.rb', line 4</span>

<span class='id identifier rubyid_state_machine'>state_machine</span> <span class='symbol'>:initial</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span> <span class='kw'>do</span>
  <span class='id identifier rubyid_event'>event</span> <span class='symbol'>:cycle</span> <span class='kw'>do</span>
    <span class='id identifier rubyid_transition'>transition</span> <span class='symbol'>:stop</span> <span class='op'>=&gt;</span> <span class='symbol'>:proceed</span><span class='comma'>,</span> <span class='symbol'>:proceed</span> <span class='op'>=&gt;</span> <span class='symbol'>:caution</span><span class='comma'>,</span> <span class='symbol'>:caution</span> <span class='op'>=&gt;</span> <span class='symbol'>:stop</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Fri Feb 17 08:30:35 2012 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.7.5 (ruby-1.9.2).
</div>

  </body>
</html>